package ooday02;

public class Dog extends Animal{
    String variety;
Dog(String name,int age,String color,String food,String variety){
    super(name,age,color,food);
    this.variety=variety;
    }

    void lookHome(){
        System.out.println("一只品种"+variety+"的,"+color+"色的"+age+"岁的小狗,名叫"+name+"正在看家....");
}
    //方法重写了
    void eat(){
        System.out.println("一只名字叫"+name+"的狗狗，它的年龄是"+age+"岁，颜色是"+color+
                "的,正在嘎嘎"+food+"的同时在哪汪汪叫");
    }
}
